export const tgSdk = ((d, s, id) => {
  var js,
    fjs = d.getElementsByTagName(s)[0];
  if (d.getElementById(id)) {
    return;
  }
  js = d.createElement(s) as HTMLImageElement;
  js.id = id;
  js.src = "https://telegram.org/js/telegram-widget.js";
  fjs.parentNode?.insertBefore(js, fjs);
})(document, "script", "telegram-jssdk");
